package net.maku.constant;

public class AnimalConstant {

    //动物状态
    public static String INPUTS_STATUS_FEEDING = "0";//饲养中
    public static String INPUTS_STATUS_SALED = "1";//售卖
    public static String INPUTS_STATUS_DEFECT = "2";//次品
    public static String INPUTS_STATUS_SUBSTANDARD = "3";//耗损

    //审核状态
    public static String SUBSTANDAR_STATUS_NUNAPPROVAL = "0";//未审核
    public static String SUBSTANDAR_STATUS_APPROVAL = "1";//已审核

    //工作模式
    public static String WORK_MOEL_1001 = "1001";//入库采集
    public static String WORK_MOEL_1002 = "1002";//检疫采集
    public static String WORK_MOEL_1003 = "1003";//检验采集
    public static String WORK_MOEL_1004 = "1004";//耗损采集
    public static String WORK_MOEL_1005 = "1005";//出库采集


    public static String DICT_ACCESS_DIRECTION = "time_boundary";//出栏数据字典 key
    public static String ACCESS_IN = "in";//进
    public static String ACCESS_OUT = "out";//出
    public static String DICT_ACCESS_INTERVAL = "collection_interval";//数据采集时间间隔

    public static final String DEFAULT_ORDER_FIX = "小程序订单：";

    //********************************Redis***************************
    public static String ROOT = "system:";//根
    public static String REDIS_DICT_ACCESS_INTERVAL_KEY = ROOT + "expire:key:";//数采集数据key

    //    public static String REDIS_WEIGHT_DATA_KEY = ROOT + "baseStation:";//基站key  hset
    public static String REDIS_WEIGHT_DATA_DATA_KEY = ROOT + "weightData";//称重key
//    public static String REDIS_WEIGHT_DATA_HEAR_BEAT_DATA_KEY = ROOT + "baseStationHeardBeatData";//基站数据key
//    public static String REDIS_WEIGHT_DATA_STATUS_KEY = ROOT + "baseStationData:status:";//基站状态 key
//    public static String REDIS_BASE_WARNING_MAX_ID = ROOT + "baseStationData:warningMaxId";//预警判断，用到最大同步数据id
//    public static String REDIS_BASE_OPEN_API_CALL_FLAG_BASESTATIONDATA = ROOT + "baseStationData:openapiflag:basestationdata:";//open api 调用标示

    public static String REDIS_EVN_DEVICE_INFO_KEY = ROOT + "deviceInfo";//环境监测设备数据
    public static String REDIS_EVN_LAST_QUERY_HISTORY_TIME_KEY = ROOT + "evnLastQueryHistoryTime";//最后一次查询历史数据时间
    public static String REDIS_API_ORIGINAL_DATA_KEY = ROOT + "apiOriginalData";//接口原始数据

    //导出
    public static String REDIS_BASE_EXPORT_PARAM_DATA_KEY = ROOT + "exportParamData";//导出数据参数（excel）key
    public static String REDIS_BASE_EXPORT_FLAG = ROOT + "exportParamData:";//导出数据参数（excel）key


    public static String REDIS_WECHAT_SESSION_KEY = ROOT + "wechat_session:";// 微信小程序的 SESSION_KEY  key拼接上openid
    public static String REDIS_WECHAT_PENDING_PAYMENT_ORDER_KEY = ROOT + "wechat_pending_payment_order";// 商城未支付订单
    //*********************************系统参数 ********************************

    //沉重设备超时 认定为离线
    public static String key_name_weight_data_status_online_timeout = "weight_data_status_online_timeout";
    //接收数据开关
    public static String key_name_weight_data_receive_switch = "weight_data_receive_switch";
    //处理数据开关
    public static String key_name_weight_data_resolve_switch = "weight_data_resolve_switch";


    //openAPI接口开关
    public static String key_name_open_api_switch = "open_api_switch";
    //openAPI是否启用签名
    public static String key_name_open_api_sign_switch = "open_api_sign_switch";
    //接口请求超时（分钟）
    public static String key_name_open_api_timeout = "open_api_timeout";
    //接口请求最小时间间隔 （秒）
    public static String key_name_open_api_call_interval = "open_api_call_interval";
    //接口查询采集时间跨度 （分钟）
    public static String key_name_open_api_query_data_collectionTime_limit = "open_api_query_data_collectionTime_limit";
    //删除N天前的历史数据（天）
    public static String key_name_delete_n_day_rfid_data = "delete_n_day_rfid_data";

    //基站名称、标签号(同步数据)有效性校验开关
    public static String key_name_sync_data_validity_check_switch = "sync_data_validity_check_switch";
    //基站名称前缀  多个用英文逗号隔开
    public static String key_name_weight_data_name_prefix = "weight_data_name_prefix";
    //标签号前缀  不包括多个用英文逗号隔开
    public static String key_name_num_exclude_prefix = "num_exclude_prefix";
    //标签号后缀  不包括多个用英文逗号隔开
    public static String key_name_num_exclude_endfix = "num_exclude_endfix";

    //自动填充经纬度开发
    public static String key_name_auto_fill_sw_switch = "auto_fill_sw_switch";
    //测试用户名称  多个用英文逗号隔开
    public static String key_name_test_user_name = "test_user_name";

    //同一个用户导出文件时间间隔（秒）
    public static String key_name_export_interval = "export_interval";
    //导出文件每个sheet 数量（条数）
    public static String key_name_export_sheetSize = "export_sheetSize";


    //登录开关  close状态下提示：系统证书已到期，请联系管理员。
    public static String key_name_login_switch = "login_switch";
    public static String key_name_close_login_switch_text = "close_login_switch_text";


    //检查耳标是否以录入耳标为准有效开关  耳标同步数据  养殖户统计耳标数  openAPI查询耳标同步数据 受影响
    public static String key_name_check_label_switch = "check_label_switch";
    //测试养殖户id 多个用英文逗号隔开
    public static String key_name_test_dept_ids = "test_dept_ids";
    //耳标自动录入开关 open close
    public static String key_name_auto_enter_data_switch = "auto_enter_data_switch";


    //同步体尺时间跨度  15分钟
    public static String key_name_query_lw_data_limit = "query_lw_data_limit";
    //同步体尺时间URL
    public static String key_name_query_lw_url = "query_lw_url";
    //对接的体尺测量设备名称 多个用英文逗号隔开
    public static String key_name_lw_device_list = "lw_device_list";


    //配种（胚胎移植）日期跨度  单位：天  N天内 认为是有配种关系  用于查找羊只关系
    public static String key_name_query_Breed_date_limit = "query_Breed_date_limit";


    //成年羊和羔羊日龄分界 单位：天
    public static String key_name_lamb_adult_dividing_day = "lamb_adult_dividing_day";

    //动物信息导出模板路径
    public static String key_name_export_animal_info_word_temp_path = "export_animal_info_word_temp_path";

    //首页数据模拟数据开关 close：从数据库（缓存中取数据）取真实数据  open:从系统参数中取数据
    public static String key_name_index_statistic_demo_switch = "index_statistic_demo_switch";

    //自动判定次品开关 同步称重设备数据判断
    public static String key_name_auto_check_defective_switch = "auto_check_defective_switch";
    //自动判定次品体重差阈值
    public static String key_name_auto_check_defective_weight_threshold = "auto_check_defective_weight_threshold";
    //自动判定次品体高差阈值
    public static String key_name_auto_check_defective_height_threshold = "auto_check_defective_height_threshold";
    //自动判定次品体长差差阈值
    public static String key_name_auto_check_defective_length_threshold = "auto_check_defective_length_threshold";
    //自动判定次品胸围差阈值
    public static String key_name_auto_check_defective_bust_threshold = "auto_check_defective_bust_threshold";
    //称重设备上传数据 标签号自动补充0 到达16位
    public static String key_name_auto_fill_zero_witch = "auto_fill_zero_witch";

    //*********************************NEW ********************************
    //判断大于N天认为是成年羊 200天
    public static String key_name_adulthood_days = "adulthood_days";

    //*********************************导出********************************

    //统计日龄1 的天数
    public static String key_name_statistic_age1_day = "statistic_age1_day";
    //统计日龄2 的天数
    public static String key_name_statistic_age2_day = "statistic_age2_day";
    //统计日龄3 的天数
    public static String key_name_statistic_age3_day = "statistic_age3_day";


    //平台首页模拟实体数据
    public static String key_name_home_statistics_system = "home_statistics_system";
    //商城首页模拟实体数据
    public static String key_name_home_statistics_mall = "home_statistics_mall";
    //饲料厂模拟实体数据
    public static String key_name_home_statistics_feed = "home_statistics_feed";
    //养殖场模拟实体数据
    public static String key_name_home_statistics_farm = "home_statistics_farm";


    //养殖场模拟实体数据
    public static String key_name_use_home_statistics_constant_switch = "use_home_statistics_constant_switch";

    //饲料厂-环境监测设备编号 多个用英文都好隔开
    public static String key_name_env_feed_device_nums = "env_feed_device_nums";
    //养殖场-环境监测设备编号 多个用英文都好隔开
    public static String key_name_env_breed_device_nums = "env_breed_device_nums";

    //饲料厂-环境监测数据项配置
    public static String key_name_env_feed_device_data_item_key_temperature = "env_feed_device_data_item_key_temperature";
    public static String key_name_env_feed_device_data_item_key_humidity = "env_feed_device_data_item_key_humidity";//湿度
    public static String key_name_env_feed_device_data_item_key_noise = "env_feed_device_data_item_key_noise";
    public static String key_name_env_feed_device_data_item_key_tpm25 = "env_feed_device_data_item_key_pm25";


    //养殖场-环境监测数据项配置
    public static String key_name_env_breed_device_data_item_key_temperature = "env_breed_device_data_item_key_temperature";
    public static String key_name_env_breed_device_data_item_key_humidity = "env_breed_device_data_item_key_humidity";//湿度
    public static String key_name_env_breed_device_data_item_key_ammonia = "env_breed_device_data_item_key_ammonia";//氨气

    //环境监测数据项单位配置
    public static String key_name_env_device_data_item_key_temperature_unit = "env_device_data_item_key_temperature_unit";
    public static String key_name_env_device_data_item_key_humidity_unit = "env_device_data_item_key_humidity_unit";
    public static String key_name_env_device_data_item_key_noise_unit = "env_device_data_item_key_noise_unit";
    public static String key_name_env_device_data_item_key_tpm25_unit = "env_device_data_item_key_pm25_unit";
    public static String key_name_env_device_data_item_key_ammonia_unit = "env_device_data_item_key_ammonia_unit";

    //定时查询环境监测历史数据时间间隔 单位分钟
    public static String key_name_env_api_query_history_data_time_interval = "env_api_query_history_data_time_interval";
    //根据最后一次查询时间，往前推重叠n分钟，查询环境监测历史数据时间 单位分钟
    public static String key_name_env_repetition_query_history_time = "env_repetition_query_history_time";

    //饲料厂-环境监测告警  上下限 用英文逗号隔开
    public static String key_name_env_feed_device_warn_temperature = "env_feed_device_warn_temperature";//饲料厂-环境监测 大气温度告警阈值 -100,100
    public static String key_name_env_feed_device_warn_humidity = "env_feed_device_warn_humidity";//湿度
    public static String key_name_env_feed_device_warn_noise = "env_feed_device_warn_noise";
    public static String key_name_env_feed_device_warn_tpm25 = "env_feed_device_warn_pm25";

    //养殖场-环境监测告警 上下限 用英文逗号隔开
    public static String key_name_env_breed_device_data_warn_temperature = "env_breed_device_data_warn_temperature";
    public static String key_name_env_breed_device_data_warn_humidity = "env_breed_device_data_warn_humidity";//湿度
    public static String key_name_env_breed_device_data_warn_ammonia = "env_breed_device_data_warn_ammonia";//氨气


    //称重设备采集rfid编号，是否去除数值前面的0 再进行对比
    //public static String key_name_weight_device_rfid_data_rm_zero_switch = "weight_device_rfid_data_rm_zero_switch";


    //*********************************其他********************************
    //基站状态
    public static String weight_data_status_online = "online";
    public static String weight_data_status_offline = "offline";

    //预警分类
    public static String warning_type_sick = "sick";//疾病
    public static String warning_type_parturition = "parturition";//分娩
    public static String warning_type_oestrus = "oestrus";//发情

    //生病记录状态
    public static String warning_sick_status_sick = "sick";//疾病
    public static String warning_sick_status_cure = "cure";//治愈


    public static String open = "open";//开
    public static String close = "close";//关

    public static String export_being = "export_being";//正在导出
    public static String export_finish = "export_finish";//导出完成


    public static String mature_sheep = "mature_sheep";//成年羊
    public static String lamb_sheep = "lamb_sheep";//羔羊

    ///// ///// ///// ///// ///// /////mybatis ///// /////
    public static String test_user_name = "testUserName";//测试用户 在mybatis中的字段标识
    //测试用户名称
    public static String test_user_deptId = "testUserDeptId";//测试用户部门
    //super User‘name division
    public static String super_username_division = "@";
    //admin user
    public static String super_username = "admin";
    //admin user
    public static String open_label_switch = "openLabelSwitch";


    //使用状态
    public static String use_status_yes = "use_status_yes";
    public static String use_status_not = "use_status_not";
    public static String use_status_test = "use_status_test";
    //结算状态
    public static String settlement_status_yes = "settlement_status_yes";
    public static String settlement_status_not = "settlement_status_not";
    //确认状态
    public static String verify_status_yes = "verify_status_yes";
    public static String verify_status_not = "verify_status_not";
    //用药情况
    public static String use_drug_status_used = "used";
    public static String use_drug_status_non_use = "non-use";
    public static String use_drug_status_non_medicated = "non-medicated";


    public static String home_page_json = "home_page_json";

    /**
     * 饲养状态
     *
     * @param status
     * @return
     */
    public static boolean isInFeeding(String status) {
        return INPUTS_STATUS_FEEDING.equals(status) || INPUTS_STATUS_DEFECT.equals(status);
    }
}
